# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-php5/ffmpeg-php/ffmpeg-php-0.5.1.ebuild,v 1.1 2007/08/30 13:00:22 jokey Exp $

PHP_EXT_NAME="sqlite3"
PHP_EXT_INI="yes"
PHP_EXT_ZENDEXT="no"

inherit depend.php php-ext-source-r1

KEYWORDS="~amd64 ~x86"

DESCRIPTION="php-sqlite3 is a PHP extension that lets you access SQLite3 databases within your scripts."
HOMEPAGE="http://php-sqlite3.sourceforge.net/pmwiki/pmwiki.php/Main/HomePage"
SRC_URI="mirror://sourceforge/php-sqlite3/sqlite3-${PV}.tgz"

LICENSE="BSD"
SLOT="0"
IUSE=""

DEPEND="dev-php/PEAR-DB"
RDEPEND="${DEPEND}"

S=${WORKDIR}/sqlite3-${PV}

PEAR_DB_DIR="/usr/share/php/DB"

need_php_by_category

src_unpack() {
	unpack ${A}

	cd "${S}"
        epatch "${FILESDIR}"/sqlite3-0.5-fix_sqlite3_finalize.patch
}

src_install() {
	php-ext-source-r1_src_install
	dodoc-php COPYING ChangeLog EXPERIMENTAL README
        
        dodir ${PEAR_DB_DIR}
        insinto ${PEAR_DB_DIR}
        doins DB/sqlite3.php
}
